package client;

import java.rmi.RemoteException;
import java.util.List;
import Server.Song;
import Server.SongDTO;
import Server.TralalaService;



public class TralalaController {

	private RMIServiceLocator rsl;
	public TralalaController(String[] args) throws RemoteException {

		rsl = new RMIServiceLocator();
		rsl.setService(args);
		new TralalaGui(this);
	
	}
	
	
	
    
    public Song receiveASong(String title) throws RemoteException{
    	
    	
    	return TralalaService.getInstance().SendASong(title);
    	//return new Song(1, "pruaba", "ly", "yo");
    }
    
 public SongDTO[] receiveSongs() throws RemoteException{
    	
    	return TralalaService.getInstance().SendSongs();
    }
  
 
    
    
    public void exit(){
    	System.exit(0);
    }
    
    public static void main(String[] args)  throws RemoteException {
        new TralalaController(args);
    }
}
